﻿var identify_Code;

function slideLogin(){

	$("#loginTable").slideDown("slow");
	
	var s = $("#errorFlag").val();
	if(s=="用户名不存在")
	{$("#tips").text("登陆失败：您的用户名不存在！！");
	setTimeout(function(){$("#tips").text('')},2000);
	}
	
	if(s=="密码错误")
	{$("#tips").text("登陆失败：您输入的密码有误！！");
	setTimeout(function(){$("#tips").text('')},2000);
	}
	change();
	var height=screen.height;
	$("#bg").css("height", height);
}

function change(){
	
	identify_Code=Math.ceil(Math.random()*10000).toString();
	
	$("#identifyBorn").text(identify_Code);

}

$(document).ready(function(){
	
	$("#writeIdentify").keyup(function(){
		
				if($("#writeIdentify").val()!=identify_Code)
						{$("#tips").text("你输入的验证码有误，请重新输入！！");
						$("#submits").attr("type","button");
						setTimeout(function(){$("#tips").text('')},2000);
						}
				else
					$("#submits").attr("type","submit");
		
	})
	
	$("#identifyBorn").click(function(){
		
		change();
		
	})
	
})



